using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class forums_controls_usercp_ChangePassword : Controls.DataManagerUserControl
{
    protected override void ItemChanged()
    {
        if (CurrentUser != null)
        {
            mviewPassword.SetActiveView(viewPassword);
            Page.Title = "FSTDT Forums: " + "Change Password";
        }
        else
        {
            mviewPassword.SetActiveView(viewError);
            Page.Title = "FSTDT Forums: " + "Oops!";
        }
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            DAL.Users.ChangePassword(CurrentUser, txtPassword1.Text);
            lblMsg.Visible = true;
        }
    }
}
